<?php
namespace Home\Controller;
use Think\Controller;
use Common\Model\UploadModel;
use Common\Model\TradeDealModel;
class IndexController extends HomeController {
    public function sy(){
       $this->display();
	}
    public function login(){
       $this->display();
	}
    public function jiaoyi(){
       $this->display();
	}
    public function downLoad(){
       $list=UploadModel::newSelf()->pagingList();
       $this->assign('list',$list);
       $this->display();
	}
	public function json()
	{
	    $data=TradeDealModel::newSelf()->limit("0,1000")->order('id desc')->select();
	    rsort($data);
	    $data2[0]['name']='value';
	    foreach ($data as $k=>$v)
	    {
	        $data2[0]['data'][]=[$v['add_time']*1000,$v['price']*1000];
	    }
	    $this->ajaxReturn($data2);
	}
}